package com.wy.demo.utils;

import com.wy.demo.bean.FTPInfo;
import org.apache.commons.net.ftp.FTPClient;

public class Run {
    public static void main(String[] args) {
        FTPInfo ftpInfo = new FTPInfo();
        ftpInfo.setTargetIp("192.168.1.197");
        ftpInfo.setPort(21);
        ftpInfo.setUsername("dmadmin");
        ftpInfo.setPassword("dmadmin");
        ftpInfo.setRemoteDirectory("/dmadmin/testFile/ftpDemo");
        ftpInfo.setLocalDirectory("D:/FounderTest/ftpDown");
        ftpInfo.setConnectTimeout(10000);
        ftpInfo.setDataTimeout(10000);
        FTPClient client = FtpUtils.getClient(ftpInfo);
        FtpUtils.downRemoteFtpFile(client,ftpInfo.getRemoteDirectory(),ftpInfo.getLocalDirectory(),"1.txt","b.txt");
    }
}
